<html>
<head><meta charset="utf-8"><title>Optimizing BodyAndCache · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html">Optimizing BodyAndCache</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="182478140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/182478140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#182478140">(Dec 03 2019 at 18:10)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="124288">@oli</span> , now that <code>BodyCache</code> (soon to be <code>BodyAndCache</code> per recommendation from eddyb through <a href="https://github.com/rust-lang/rust/pull/66991" target="_blank" title="https://github.com/rust-lang/rust/pull/66991">https://github.com/rust-lang/rust/pull/66991</a>) is in, should I move forward with figuring out which fn's are good candidates for an <code>#[inline]</code> attribute? Or should I jump back to the <code>wg-parallel-rustc</code> project?</p>



<a name="182478473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/182478473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#182478473">(Dec 03 2019 at 18:14)</a>:</h4>
<p>iirc eddy fixed it themselves. Not sure if the inline stuff gets us anywhere, so... I guess you removed another stumbling stone for parallel rustc and can search for the next one :D</p>



<a name="182479428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/182479428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#182479428">(Dec 03 2019 at 18:23)</a>:</h4>
<p>I think my change also includes the removal of that body fn we tried getting rid of before. Otherwise it's the same (not sure if his also cleans up the reborrows)</p>



<a name="182483017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/182483017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#182483017">(Dec 03 2019 at 18:58)</a>:</h4>
<p>I'll check it out, but let's wait until their PR is merged</p>



<a name="182838927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/182838927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#182838927">(Dec 07 2019 at 10:23)</a>:</h4>
<blockquote>
<p>BodyCache (soon to be BodyAndCache)</p>
</blockquote>
<p>And there, Miri breaks again. ;)</p>



<a name="182838975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/182838975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#182838975">(Dec 07 2019 at 10:24)</a>:</h4>
<p>(but we did get Miri into yesterday's nightly so all is fine)</p>



<a name="182919638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/182919638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#182919638">(Dec 09 2019 at 02:23)</a>:</h4>
<p>I had no idea my changes broke miri. So sorry! What steps would I need to take to ensure it doesn't break in the future? I tend to take longer since I can't work on the project full time, and ensuring my changes cause as little trouble as possible is more important to me than getting something out quickly</p>



<a name="182943387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/182943387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#182943387">(Dec 09 2019 at 10:42)</a>:</h4>
<p>If you want to see whether clippy or miri break, you can run <code>./x.py test src/tools/miri</code> (or clippy) and see if that still compiles. If it does not, you can fix it until it works again and then open a PR with your changes to the respective repo</p>



<a name="183168132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/183168132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#183168132">(Dec 11 2019 at 15:32)</a>:</h4>
<p><span class="user-mention" data-user-id="116114">@Paul Faria</span> it's okay, Miri gets broken at least once a month. That is the price we pay for using internal compiler APIs. we also benefit a lot from that.</p>



<a name="183168177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/183168177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#183168177">(Dec 11 2019 at 15:32)</a>:</h4>
<p>We just had a bad streak of Miri being broken in 4 different ways by 4 PRs that landed within 48h or so^^</p>



<a name="183168238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/183168238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#183168238">(Dec 11 2019 at 15:33)</a>:</h4>
<p>testing if clippy/miri break takes a lot of time, and I don't expect all rustc contributors to do that. if people help with the fallout after landing their PR, that is appreciated, but not mandatory. :)</p>



<a name="183168346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing%20BodyAndCache/near/183168346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Optimizing.20BodyAndCache.html#183168346">(Dec 11 2019 at 15:34)</a>:</h4>
<p>but it would be good to be mindful that there are (semi-)external consumers of some of these APIs, so we should avoid renaming a type 3 times while iterating towards the best name.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>